{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$meta_title}</h2>
		</div>
		<div class="pull-right">
			<a href="{:url('add')}" class="btn btn-primary pull-right"> <i class="fa fa-plus-circle fa-lg"></i> 新增</a>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<div class="table-responsive">
      <table class="table table-striped table-hover">
        <thead>
          <tr>
						<th width="30"><input class="checkbox check-all" type="checkbox"></th>
            <th width="60">ID</th>
						<th>管理员</th>
            <th>UID/微信号</th>

            <th>用户名</th>
            <th>留言内容</th>
            <th>留言时间</th>
						<th>回复内容</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          {volist name="list" id="item"}
          <tr>
						<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
            <td>{$item['id']}</td>
						<td>{$item.messageReply.admin_id|get_table_field="uid","username","member"}</td>
            <td> {$item['user_id']}/{$item['user_id']|get_table_field="id","nickname","wx_user"}</td>
            <td>{$item['user_id']|get_table_field="id","name","wx_user"}</td>
            <td>{$item['content']|msubstr='0','12'}</td>
            <td>{$item['create_time']|time_format}</td>
						<td>{$item.messageReply.content|msubstr='0','12'}</td>
            <td>
							<a href="{:url('edit',array('id'=>$item['id']))}">查看</a>
              <a href="{:url('del',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>
            </td>
          </tr>
          {/volist}
        </tbody>
      </table>
      {$list->render()}
		</div>
	</div>
</div>
{/block}
